<?php

namespace Home\Model;

use Think\Model\RelationModel;
class CategoryModel extends RelationModel
{
    protected $_link = array(
        'children'=>array(
            'mapping_type'      => self::HAS_MANY,
            'class_name'        => 'Category',
            'foreign_key'           => 'parent_id',
            'mapping_name'      =>  "children",
        )
    );



}

